<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>支付记录</title>
    <#include "/include/resource.html"/>
    <script type="application/javascript">
        function confirmToCancel(id){
            bootbox.confirm("Confirm the delete action!？", function (result) {
                if (result) {
                    $.ajax({
                        type: "POST",
                        url: "${base}/admin/payLog/delete?id="+id,
                        dataType: "json",
                        success: function(data){
                            console.log(data);
                            if(typeof(data)!='undefined'){

                                $('#myModal').modal('show');
                            }
                        },
                        error:function(){

                        }
                    });
                }
            });
        }
    </script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <#include "/include/header.html"/>
    <#include "/include/main-sidebar.html"/>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                
                <small> 支付记录</small>
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-dashboard"></i> </li>
                <li class="active">支付记录</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">支付记录</h3>
                            <a type="button" class="btn btn-block btn-primary btn-sm add" onclick="HF.showDialog('${base}/admin/payLog/operate')" href="#">Add</a>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <form id="tableForm" method="post" class="form-horizontal" action="${base}/admin/payLog/list">
                                <div class="form-group">

                                    <div class="row">
                                        <div class="col-md-2">
                                            <label for="inputEmail3_" class="col-md-4 control-label">Name</label>
                                            <div class="col-md-8">
                                                <input type="text" class="form-control" value="${(queryParam.riderName)!''}"
                                                       name="riderName" id="inputEmail3_" placeholder="Name">
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <label for="inputEmail3_" class="col-md-4 control-label">电话</label>
                                            <div class="col-md-8">
                                                <input type="text" class="form-control" value="${(queryParam.phone)!''}"
                                                       name="phone" id="inputEmail4_" placeholder="电话号码">
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <label for="inputEmail3_" class="col-md-4 control-label">时间：</label>
                                            <div class="col-md-8 input-daterange input-group" id="datepicker">
                                                <input type="text" class="form-control input-sm" value="${(queryParam.beginTime)!''}"
                                                       name="beginTime">
                                                <span class="input-group-addon">至</span>
                                                <input type="text" class="form-control input-sm" value="${(queryParam.endTime)!''}"
                                                       name="endTime">
                                            </div>
                                        </div>
                                        <div class="col-md-1">

                                                <button type="button" onclick="HF.listQuery();"
                                                        class="btn btn-primary">Query
                                                </button>
                                        </div>
                                        <div class="col-md-1">
                                                <button style="float: right;" type="button" onclick="HF.listExcelExport();"
                                                        class="btn btn-primary">导出
                                                </button>
                                        </div>
                                    </div>


                                </div>
                            <table class="table table-bordered">
                                <tr>
                                    <th>SequenceNo</th>
                                    <th>手机号码</th>
                                    <th>骑手Name</th>
                                    <th>充值金额</th>
                                    <th>充值日期</th>
                                    <th>开始日期</th>
                                    <th>过期日期</th>
                                    <th>Note</th>
                                    <th>套餐Name</th>
                                    <th>充值类型</th>
                                    <th>优惠劵金额</th>
                                    <th>退款金额</th>
                                    <th>优惠券Id</th>
                                    <th>ActionList</th>
                                </tr>
                               <#if list??&&list?size gt 0>
                               <#list list as t>
                                <tr>
                                    <td>${t_index+1}</td>
                                    <td>${(t.phone)!}</td>
                                    <td>${(t.riderName)!}</td>
                                    <td>${(t.payMoney)!}</td>
                                    <td>${(nav.getDate(t.createDate!))!}</td>
                                    <td>${(nav.getDate(t.beginDate!))!}</td>
                                    <td>${(nav.getDate(t.endDate!))!}</td>
                                    <td>${(t.memo)!}</td>
                                    <td>${(t.packageName)!}</td>
                                    <td>${(t.catagory)!}</td>
                                    <td>${(t.discountMoney)!}</td>
                                    <td>${(t.refundMoney)!}</td>
                                    <td>${(t.discountIds)!}</td>
                                    <td style="width: 80px;">
                                        <a href="${t.img!'#'}" >查看附件</a>
                                        <#if t.transaction_id??>
                                            <a href="${base}/admin/refundLog/list?payLogId=${t.id?c}" >退款记录</a>
                                        </#if>
                                    </td>
                                    </td>
                                    </tr>
                                    </#list>
                                    <#else>
                                        <td colspan="11" align="center">no record!</td>

                                </#if>
                            </table>
                        </div>
                        <!-- /.box-body -->
                        <@p.pager pageNo=pageNo pageSize=pageSize totalCount=totalCount />
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- 弹出窗口 -->
    <#include "/include/modal.html"/>
    <#include "/include/footer.html"/>

    <!-- /.content-wrapper -->

    <div class="control-sidebar-bg"></div>
</div>
<#include "/include/js_footer.html"/>

<script type="application/javascript">
    $(function () {

//        $('#reservation').daterangepicker();
//      //  $('#reservation').daterangepicker({autoUpdateInput:false});
//        $('.reservation').daterangepicker({
//
//            startDate:'', endDate:''})
        $.fn.datepicker.defaults.format = "yyyy-mm-dd";
        $('#datepicker').datepicker({
            autoclose: true
        })

        $('#datepicker_').datepicker({
            autoclose: true
        })

    })
</script>
</body>

</html>
